#ifndef GPU_PLANNER_H_
#define GPU_PLANNER_H_

#include "ompl/geometric/planners/PlannerIncludes.h"
#include "IIterationCount.h"

namespace ompl
{
	namespace app
	{
		class GeometrySpecification;
	}
}


/** \brief Rapidly-exploring Random Trees */
class GPUPlanner : public ompl::base::Planner, public IIterationCount
{
public:

    /** \brief Constructor */
    GPUPlanner(const ompl::base::SpaceInformationPtr &si, const ompl::app::GeometrySpecification* geometrySpecification);

    virtual ~GPUPlanner(void);

    virtual void getPlannerData(ompl::base::PlannerData &data) const;

	virtual ompl::base::PlannerStatus solve(const ompl::base::PlannerTerminationCondition &ptc) = 0;

    virtual void clear(void);

    void setRange(double distance)
    {
        maxDistance_ = distance;
    }

    double getRange(void) const
    {
        return maxDistance_;
    }

    virtual void setup(void);

	const std::vector<double>& GetBoundsMin() const { return vBoundsMin_; }
	const std::vector<double>& GetBoundsMax() const { return vBoundsMax_; }

protected:



    /** \brief Free the memory allocated by this planner */
    virtual void freeMemory(void);

    /** \brief The maximum length of a motion to be added to a tree */
    double                                         maxDistance_;

	const ompl::app::GeometrySpecification* geometrySpecification_;

	void getSpaceBounds();
	std::vector<double> vBoundsMin_;
	std::vector<double> vBoundsMax_;
		
};


#endif
